Skip to content

chore: Make tree-sitter optional#2450

Merged
huacnlee merged 2 commits into
longbridge:mainfrom
stayhydated:tree-sitter-optional
Jul 6, 2026
Merged

chore: Make tree-sitter optional#2450
huacnlee merged 2 commits into
longbridge:mainfrom
stayhydated:tree-sitter-optional

Conversation

@stayhydated

@stayhydated stayhydated commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Description

Make tree-sitter optional

How to Test

cargo check -p gpui-component --no-default-features
cargo check -p gpui-component --features tree-sitter-languages
cargo check -p gpui-component --target wasm32-unknown-unknown
cargo check -p gpui-component --target wasm32-unknown-unknown --features tree-sitter-languages
cargo check --workspace
cargo test -p gpui-component --no-default-features
cargo test -p gpui-component --features tree-sitter-languages

Checklist

  • I have read the CONTRIBUTING document and followed the guidelines.
  • Reviewed the changes in this PR and confirmed AI generated code (If any) is accurate.
  • Passed cargo run for story tests related to the changes.
  • Tested macOS, Windows and Linux platforms performance (if the change is platform-specific)

@stayhydated stayhydated force-pushed the tree-sitter-optional branch from c96bf7b to 26b319b Compare June 11, 2026 04:06
@stayhydated stayhydated changed the title tree-sitter : make optional and WASM stubs fix tree-sitter : make optional Jun 11, 2026
@stayhydated stayhydated force-pushed the tree-sitter-optional branch from 3cae3f6 to d3966eb Compare June 13, 2026 21:40
Collapse the compound predicates (all(not(wasm), feature "tree-sitter")
and any(wasm, not(feature "tree-sitter"))) down to `feature = "tree-sitter"`
and its negation. The wasm dimension was redundant: story-web builds with
default-features = false, so tree-sitter is always off on wasm and the stub
path already covers it. Using `X` vs `not(X)` also makes the two paths
mutually exclusive by construction, so they can no longer drift apart.

Add a CI step to guard the disabled path:
`cargo check -p gpui-component --no-default-features`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@huacnlee huacnlee changed the title tree-sitter : make optional chore: Make tree-sitter optional Jul 6, 2026
@huacnlee huacnlee enabled auto-merge (squash) July 6, 2026 03:32
@huacnlee huacnlee merged commit 372446c into longbridge:main Jul 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants